<?php 
	$host = "localhost";
	$userName = "root";
	$pwd = "";
	$dbName = "text";
	$dbms='mysql';
	$dsn="$dbms:host=$host;dbname=$dbName";
	try {
		$db = new PDO($dsn,'root','');
		//echo "连接成功。";
	} catch (Exception $exc) {
		//echo $exc->getMassage();
	}
	$db->query('set names utf8');
	
	$result = $db->query("SELECT * FROM `user`");
	$result->setFetchMode(PDO::FETCH_ASSOC);
	$str = "";
	while($row=$result->fetch()){
		$str .= "
 			<tr>
 			</tr>";
	}
	exit($str);
?>